<?php
use yii\helpers\Url;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

?>
	<header id="gtco-header" class="gtco-cover gtco-cover-sm" role="banner" style="background-image: url(<?= Url::to("@web/images/img_4.jpg")?>)">
		<div class="overlay"></div>
		<div class="gtco-container">
			<div class="row">
				<div class="col-md-12 col-md-offset-0 text-left">
					<div class="row row-mt-15em">

						<div class="col-md-7 mt-text animate-box" data-animate-effect="fadeInUp">
							<span class="intro-text-small">Don't be shy</span>
							<h1>Get In Touch</h1>	
						</div>
						
					</div>
					
				</div>
			</div>
		</div>
	</header>
	<div class="row">
				<div class="feature-center animate-box" data-animate-effect="fadeIn">
					<h3 ><?= $videos['video_title']?></h3>
					<video width="100%" height="50%" controls="controls">
						<source src="<?= Yii::$app->params['video'].$videos['video_url']?>" type="video/mp4" />
					</video>
					<p><?= $videos['description']?></p>
					<a href="###" class="like" onclick="like(<?= $videos['id']?>,<?= empty($videos['like_number']) ? 0 : $videos['like_number']?>)">顶(<?= empty($videos['like_number']) ? 0 : $videos['like_number']?>)</a>
					<a href="###" class="step" onclick="step_num(<?= $videos['id']?>,<?= empty($videos['step_number']) ? 0 : $videos['step_number']?>)" style="color: #669999">踩(<?= empty($videos['step_number']) ? 0 : $videos['step_number']?>)</a>
					<input type="hidden" id="_csrf" name="_csrf-frontend" value="<?= Yii::$app->request->csrfToken ?>">
					<input type="hidden" id="is_vote" value="<?= $is_vote;?>">
				</div>
	</div>

<div class="gtco-section border-bottom">
	<div class="gtco-container">
		<div class="row">
			<div class="col-md-12">
				<div class="col-md-6 animate-box">
					<h3>Get In Touch</h3>
					<form action="#">
						<div class="row form-group">
							<div class="col-md-12">
								<label class="sr-only" for="name">Name</label>
								<input type="text" id="name" class="form-control" placeholder="You firstname">
							</div>

						</div>

						<div class="row form-group">
							<div class="col-md-12">
								<label class="sr-only" for="email">Email</label>
								<input type="text" id="email" class="form-control" placeholder="Your email address">
							</div>
						</div>

						<div class="row form-group">
							<div class="col-md-12">
								<label class="sr-only" for="subject">Subject</label>
								<input type="text" id="subject" class="form-control" placeholder="Your subject of this message">
							</div>
						</div>
                        <img src="<?= Yii::$app->params['img'].'expression/01.gif'?>">
						<?php $form = ActiveForm::begin(); ?>

<!--						--><?php //echo $form->field($comment,'content')->widget('pjkui\kindeditor\KindEditor',[])?>
<!--                        --><?//= $form->field($comment, 'content')->widget(\yii\redactor\widgets\Redactor::className(), [
//                            'clientOptions' => [
////                                'imageManagerJson' => ['/redactor/upload/image-json'],
//                               // 'imageUpload' => ['/redactor/upload/image'],
//                                //'fileUpload' => ['/redactor/upload/file'],
//                                'lang' => 'zh_cn',
////                                'plugins' => ['clips', 'fontcolor','imagemanager']
//                                'plugins' => ['clips']
//                            ]
//                        ]) ?>
                        <textarea style="height: 150px;width: 500px">

                        </textarea>
						<div class="form-group">
							<input type="submit" value="Send Message" class="btn btn-primary">
						</div>
						<?php ActiveForm::end(); ?>

					</form>

				</div>
				<div class="col-md-5 col-md-push-1 animate-box">

					<div class="gtco-contact-info">
						<h3>Contact Information</h3>
						<ul>
							<li class="address">198 West 21th Street, <br> Suite 721 New York NY 10016</li>
							<li class="phone"><a href="tel://1234567920">+ 1235 2355 98</a></li>
							<li class="email"><a href="mailto:info@yoursite.com">info@yoursite.com</a></li>
							<li class="url"><a href="http://"></a></li>
						</ul>
					</div>


				</div>
			</div>
		</div>
	</div>
</div>

<footer id="gtco-footer" role="contentinfo">
	<div class="gtco-container">
		<div class="row row-p	b-md">

			<div class="col-md-4">
				<div class="gtco-widget">
					<h3>About <span class="footer-logo">Splash<span>.<span></span></h3>
					<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore eos molestias quod sint ipsum possimus temporibus officia iste perspiciatis consectetur in fugiat repudiandae cum. Totam cupiditate nostrum ut neque ab?</p>
				</div>
			</div>

			<div class="col-md-4 col-md-push-1">
				<div class="gtco-widget">
					<h3>Links</h3>
					<ul class="gtco-footer-links">
						<li><a href="#">Knowledge Base</a></li>
						<li><a href="#">Career</a></li>
						<li><a href="#">Press</a></li>
						<li><a href="#">Terms of services</a></li>
						<li><a href="#">Privacy Policy</a></li>
					</ul>
				</div>
			</div>

			<div class="col-md-4">
				<div class="gtco-widget">
					<h3>Get In Touch</h3>
					<ul class="gtco-quick-contact">
						<li><a href="#"><i class="icon-phone"></i> +1 234 567 890</a></li>
						<li><a href="#"><i class="icon-mail2"></i> info@</a></li>
						<li><a href="#"><i class="icon-chat"></i> Live Chat</a></li>
					</ul>
				</div>
			</div>

		</div>

		<div class="row copyright">
			<div class="col-md-12">
				<p class="pull-left">
					<small class="block">Copyright &copy; 2016.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a></small>
				</p>
				<p class="pull-right">
				<ul class="gtco-social-icons pull-right">
					<li><a href="#"><i class="icon-twitter"></i></a></li>
					<li><a href="#"><i class="icon-facebook"></i></a></li>
					<li><a href="#"><i class="icon-linkedin"></i></a></li>
					<li><a href="#"><i class="icon-dribbble"></i></a></li>
				</ul>
				</p>
			</div>
		</div>

	</div>
</footer>
<script>
	function like(id,like_numb){
		var is_vote = $("#is_vote").val();
		if (!is_vote){
			alert('你已经参加过了');
			return false;
		}
		var numb = ++like_numb;
		var type = 1;
		var csrf = $("#_csrf").val();
		$('.like').text("顶("+numb+")");
		$('.step').css('color','#909090');
		$('.step').attr('onclick','').unbind('click');
		$.post("<?= Url::to(['video/like'])?>",{id:id,type:type,_csrf_frontend:csrf},function(result){
			console.log(result);
		});
	}

	function step_num(id,step_numb){
		var is_vote = $("#is_vote").val();
		if (!is_vote){
			alert('你已经参加过了');
			return false;
		}
		var numb = ++step_numb;
		var type = 2;
		var csrf = $("#_csrf").val();
		$('.step').text("顶("+numb+")");
		$('.like').css('color','#909090');
		$('.like').attr('onclick','').unbind('click');
		$.post("<?= Url::to(['video/like'])?>",{id:id,type:type,_csrf_frontend:csrf},function(result){
			console.log(result);
		});
	}
</script>

